package com.example.mobile2021606127cxz0510homework.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.fragment.app.Fragment;

import com.example.mobile2021606127cxz0510homework.R;


public class ZiChangFragment extends Fragment {


    private TextView tvAll;
    private ImageView imgTesila;
    private ImageView imgRichan;
    private TextView tvMainTesila;
    private TextView tvMainRichang;


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_zi_chang, container, false);
        initView(view);
        return view;
    }

    @Override
    public void onStart() {
        super.onStart();
        tvAll.setText("名下车辆：");
        tvMainTesila.setText("粤E 12345            ETC余额：2000");
        tvMainRichang.setText("粤E 56789            ETC余额：200");
    }

    private void initView(View view) {
        tvAll = (TextView) view.findViewById(R.id.tv_all);
        imgTesila = (ImageView) view.findViewById(R.id.img_tesila);
        imgRichan = (ImageView) view.findViewById(R.id.img_richan);
        tvMainTesila = (TextView) view.findViewById(R.id.tv_main_tesila);
        tvMainRichang = (TextView) view.findViewById(R.id.tv_main_richang);
    }
}